using NUnit.Framework;
using dnAnalytics.Math;
namespace dnAnalytics.Tests.Math
{
    [TestFixture]
    public class ComplexMath_PlusTest
    {
        [Test]
        public void Plus()
        {
            Complex a = new Complex(1.19209289550780998537e-7, 1.19209289550780998537e-7);
            Complex b = new Complex(1.19209289550780998537e-7, 1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(2.38418579101561997074e-7, 2.38418579101561997074e-7), 15);
            a = new Complex(0.0, 1.19209289550780998537e-7);
            b = new Complex(0.0, -1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(0.0, -1.19209289550780998537e-7);
            b = new Complex(0.0, 5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 4.99999880790710449219e-1), 15);
            a = new Complex(0.0, 5.0e-1);
            b = new Complex(0.0, -5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(0.0, -5.0e-1);
            b = new Complex(0.0, 1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 5.0e-1), 15);
            a = new Complex(0.0, 1.0);
            b = new Complex(0.0, -1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(0.0, -1.0);
            b = new Complex(0.0, 2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 1.0), 15);
            a = new Complex(0.0, 2.0);
            b = new Complex(0.0, -2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(0.0, -2.0);
            b = new Complex(0.0, 8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 8.388606e6), 15);
            a = new Complex(0.0, 8.388608e6);
            b = new Complex(0.0, -8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(0.0, -8.388608e6);
            b = new Complex(1.19209289550780998537e-7, 0.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(1.19209289550780998537e-7, -8.388608e6), 15);
            a = new Complex(1.19209289550780998537e-7, 0.0);
            b = new Complex(-1.19209289550780998537e-7, 0.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-1.19209289550780998537e-7, 0.0);
            b = new Complex(1.19209289550780998537e-7, 1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 1.19209289550780998537e-7), 15);
            a = new Complex(1.19209289550780998537e-7, 1.19209289550780998537e-7);
            b = new Complex(1.19209289550780998537e-7, -1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(2.38418579101561997074e-7, 0.0), 15);
            a = new Complex(1.19209289550780998537e-7, -1.19209289550780998537e-7);
            b = new Complex(-1.19209289550780998537e-7, 1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-1.19209289550780998537e-7, 1.19209289550780998537e-7);
            b = new Complex(-1.19209289550780998537e-7, -1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(-2.38418579101561997074e-7, 0.0), 15);
            a = new Complex(-1.19209289550780998537e-7, -1.19209289550780998537e-7);
            b = new Complex(1.19209289550780998537e-7, 5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 4.99999880790710449219e-1), 15);
            a = new Complex(1.19209289550780998537e-7, 5.0e-1);
            b = new Complex(1.19209289550780998537e-7, -5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(2.38418579101561997074e-7, 0.0), 15);
            a = new Complex(1.19209289550780998537e-7, -5.0e-1);
            b = new Complex(-1.19209289550780998537e-7, 5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-1.19209289550780998537e-7, 5.0e-1);
            b = new Complex(-1.19209289550780998537e-7, -5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(-2.38418579101561997074e-7, 0.0), 15);
            a = new Complex(-1.19209289550780998537e-7, -5.0e-1);
            b = new Complex(1.19209289550780998537e-7, 1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 5.0e-1), 15);
            a = new Complex(1.19209289550780998537e-7, 1.0);
            b = new Complex(1.19209289550780998537e-7, -1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(2.38418579101561997074e-7, 0.0), 15);
            a = new Complex(1.19209289550780998537e-7, -1.0);
            b = new Complex(-1.19209289550780998537e-7, 1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-1.19209289550780998537e-7, 1.0);
            b = new Complex(-1.19209289550780998537e-7, -1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(-2.38418579101561997074e-7, 0.0), 15);
            a = new Complex(-1.19209289550780998537e-7, -1.0);
            b = new Complex(1.19209289550780998537e-7, 2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 1.0), 15);
            a = new Complex(1.19209289550780998537e-7, 2.0);
            b = new Complex(1.19209289550780998537e-7, -2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(2.38418579101561997074e-7, 0.0), 15);
            a = new Complex(1.19209289550780998537e-7, -2.0);
            b = new Complex(-1.19209289550780998537e-7, 2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-1.19209289550780998537e-7, 2.0);
            b = new Complex(-1.19209289550780998537e-7, -2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(-2.38418579101561997074e-7, 0.0), 15);
            a = new Complex(-1.19209289550780998537e-7, -2.0);
            b = new Complex(1.19209289550780998537e-7, 8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 8.388606e6), 15);
            a = new Complex(1.19209289550780998537e-7, 8.388608e6);
            b = new Complex(1.19209289550780998537e-7, -8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(2.38418579101561997074e-7, 0.0), 15);
            a = new Complex(1.19209289550780998537e-7, -8.388608e6);
            b = new Complex(-1.19209289550780998537e-7, 8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-1.19209289550780998537e-7, 8.388608e6);
            b = new Complex(-1.19209289550780998537e-7, -8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(-2.38418579101561997074e-7, 0.0), 15);
            a = new Complex(-1.19209289550780998537e-7, -8.388608e6);
            b = new Complex(5.0e-1, 0.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(4.99999880790710449219e-1, -8.388608e6), 15);
            a = new Complex(5.0e-1, 0.0);
            b = new Complex(-5.0e-1, 0.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-5.0e-1, 0.0);
            b = new Complex(5.0e-1, 1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 1.19209289550780998537e-7), 15);
            a = new Complex(5.0e-1, 1.19209289550780998537e-7);
            b = new Complex(5.0e-1, -1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(1.0, 0.0), 15);
            a = new Complex(5.0e-1, -1.19209289550780998537e-7);
            b = new Complex(-5.0e-1, 1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-5.0e-1, 1.19209289550780998537e-7);
            b = new Complex(-5.0e-1, -1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(-1.0, 0.0), 15);
            a = new Complex(-5.0e-1, -1.19209289550780998537e-7);
            b = new Complex(5.0e-1, 5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 4.99999880790710449219e-1), 15);
            a = new Complex(5.0e-1, 5.0e-1);
            b = new Complex(5.0e-1, -5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(1.0, 0.0), 15);
            a = new Complex(5.0e-1, -5.0e-1);
            b = new Complex(-5.0e-1, 5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-5.0e-1, 5.0e-1);
            b = new Complex(-5.0e-1, -5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(-1.0, 0.0), 15);
            a = new Complex(-5.0e-1, -5.0e-1);
            b = new Complex(5.0e-1, 1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 5.0e-1), 15);
            a = new Complex(5.0e-1, 1.0);
            b = new Complex(5.0e-1, -1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(1.0, 0.0), 15);
            a = new Complex(5.0e-1, -1.0);
            b = new Complex(-5.0e-1, 1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-5.0e-1, 1.0);
            b = new Complex(-5.0e-1, -1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(-1.0, 0.0), 15);
            a = new Complex(-5.0e-1, -1.0);
            b = new Complex(5.0e-1, 2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 1.0), 15);
            a = new Complex(5.0e-1, 2.0);
            b = new Complex(5.0e-1, -2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(1.0, 0.0), 15);
            a = new Complex(5.0e-1, -2.0);
            b = new Complex(-5.0e-1, 2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-5.0e-1, 2.0);
            b = new Complex(-5.0e-1, -2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(-1.0, 0.0), 15);
            a = new Complex(-5.0e-1, -2.0);
            b = new Complex(5.0e-1, 8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 8.388606e6), 15);
            a = new Complex(5.0e-1, 8.388608e6);
            b = new Complex(5.0e-1, -8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(1.0, 0.0), 15);
            a = new Complex(5.0e-1, -8.388608e6);
            b = new Complex(-5.0e-1, 8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-5.0e-1, 8.388608e6);
            b = new Complex(-5.0e-1, -8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(-1.0, 0.0), 15);
            a = new Complex(-5.0e-1, -8.388608e6);
            b = new Complex(1.0, 0.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(5.0e-1, -8.388608e6), 15);
            a = new Complex(1.0, 0.0);
            b = new Complex(-1.0, 0.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-1.0, 0.0);
            b = new Complex(1.0, 1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 1.19209289550780998537e-7), 15);
            a = new Complex(1.0, 1.19209289550780998537e-7);
            b = new Complex(1.0, -1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(2.0, 0.0), 15);
            a = new Complex(1.0, -1.19209289550780998537e-7);
            b = new Complex(-1.0, 1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-1.0, 1.19209289550780998537e-7);
            b = new Complex(-1.0, -1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(-2.0, 0.0), 15);
            a = new Complex(-1.0, -1.19209289550780998537e-7);
            b = new Complex(1.0, 5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 4.99999880790710449219e-1), 15);
            a = new Complex(1.0, 5.0e-1);
            b = new Complex(1.0, -5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(2.0, 0.0), 15);
            a = new Complex(1.0, -5.0e-1);
            b = new Complex(-1.0, 5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-1.0, 5.0e-1);
            b = new Complex(-1.0, -5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(-2.0, 0.0), 15);
            a = new Complex(-1.0, -5.0e-1);
            b = new Complex(1.0, 1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 5.0e-1), 15);
            a = new Complex(1.0, 1.0);
            b = new Complex(1.0, -1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(2.0, 0.0), 15);
            a = new Complex(1.0, -1.0);
            b = new Complex(-1.0, 1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-1.0, 1.0);
            b = new Complex(-1.0, -1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(-2.0, 0.0), 15);
            a = new Complex(-1.0, -1.0);
            b = new Complex(1.0, 2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 1.0), 15);
            a = new Complex(1.0, 2.0);
            b = new Complex(1.0, -2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(2.0, 0.0), 15);
            a = new Complex(1.0, -2.0);
            b = new Complex(-1.0, 2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-1.0, 2.0);
            b = new Complex(-1.0, -2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(-2.0, 0.0), 15);
            a = new Complex(-1.0, -2.0);
            b = new Complex(1.0, 8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 8.388606e6), 15);
            a = new Complex(1.0, 8.388608e6);
            b = new Complex(1.0, -8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(2.0, 0.0), 15);
            a = new Complex(1.0, -8.388608e6);
            b = new Complex(-1.0, 8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-1.0, 8.388608e6);
            b = new Complex(-1.0, -8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(-2.0, 0.0), 15);
            a = new Complex(-1.0, -8.388608e6);
            b = new Complex(2.0, 0.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(1.0, -8.388608e6), 15);
            a = new Complex(2.0, 0.0);
            b = new Complex(-2.0, 0.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-2.0, 0.0);
            b = new Complex(2.0, 1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 1.19209289550780998537e-7), 15);
            a = new Complex(2.0, 1.19209289550780998537e-7);
            b = new Complex(2.0, -1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(4.0, 0.0), 15);
            a = new Complex(2.0, -1.19209289550780998537e-7);
            b = new Complex(-2.0, 1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-2.0, 1.19209289550780998537e-7);
            b = new Complex(-2.0, -1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(-4.0, 0.0), 15);
            a = new Complex(-2.0, -1.19209289550780998537e-7);
            b = new Complex(2.0, 5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 4.99999880790710449219e-1), 15);
            a = new Complex(2.0, 5.0e-1);
            b = new Complex(2.0, -5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(4.0, 0.0), 15);
            a = new Complex(2.0, -5.0e-1);
            b = new Complex(-2.0, 5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-2.0, 5.0e-1);
            b = new Complex(-2.0, -5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(-4.0, 0.0), 15);
            a = new Complex(-2.0, -5.0e-1);
            b = new Complex(2.0, 1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 5.0e-1), 15);
            a = new Complex(2.0, 1.0);
            b = new Complex(2.0, -1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(4.0, 0.0), 15);
            a = new Complex(2.0, -1.0);
            b = new Complex(-2.0, 1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-2.0, 1.0);
            b = new Complex(-2.0, -1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(-4.0, 0.0), 15);
            a = new Complex(-2.0, -1.0);
            b = new Complex(2.0, 2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 1.0), 15);
            a = new Complex(2.0, 2.0);
            b = new Complex(2.0, -2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(4.0, 0.0), 15);
            a = new Complex(2.0, -2.0);
            b = new Complex(-2.0, 2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-2.0, 2.0);
            b = new Complex(-2.0, -2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(-4.0, 0.0), 15);
            a = new Complex(-2.0, -2.0);
            b = new Complex(2.0, 8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 8.388606e6), 15);
            a = new Complex(2.0, 8.388608e6);
            b = new Complex(2.0, -8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(4.0, 0.0), 15);
            a = new Complex(2.0, -8.388608e6);
            b = new Complex(-2.0, 8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-2.0, 8.388608e6);
            b = new Complex(-2.0, -8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(-4.0, 0.0), 15);
            a = new Complex(-2.0, -8.388608e6);
            b = new Complex(8.388608e6, 0.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(8.388606e6, -8.388608e6), 15);
            a = new Complex(8.388608e6, 0.0);
            b = new Complex(-8.388608e6, 0.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-8.388608e6, 0.0);
            b = new Complex(8.388608e6, 1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 1.19209289550780998537e-7), 15);
            a = new Complex(8.388608e6, 1.19209289550780998537e-7);
            b = new Complex(8.388608e6, -1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(1.6777216e7, 0.0), 15);
            a = new Complex(8.388608e6, -1.19209289550780998537e-7);
            b = new Complex(-8.388608e6, 1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-8.388608e6, 1.19209289550780998537e-7);
            b = new Complex(-8.388608e6, -1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(-1.6777216e7, 0.0), 15);
            a = new Complex(-8.388608e6, -1.19209289550780998537e-7);
            b = new Complex(8.388608e6, 5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 4.99999880790710449219e-1), 15);
            a = new Complex(8.388608e6, 5.0e-1);
            b = new Complex(8.388608e6, -5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(1.6777216e7, 0.0), 15);
            a = new Complex(8.388608e6, -5.0e-1);
            b = new Complex(-8.388608e6, 5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-8.388608e6, 5.0e-1);
            b = new Complex(-8.388608e6, -5.0e-1);
            TestHelper.TestSignificantDigits(a + b, new Complex(-1.6777216e7, 0.0), 15);
            a = new Complex(-8.388608e6, -5.0e-1);
            b = new Complex(8.388608e6, 1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 5.0e-1), 15);
            a = new Complex(8.388608e6, 1.0);
            b = new Complex(8.388608e6, -1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(1.6777216e7, 0.0), 15);
            a = new Complex(8.388608e6, -1.0);
            b = new Complex(-8.388608e6, 1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-8.388608e6, 1.0);
            b = new Complex(-8.388608e6, -1.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(-1.6777216e7, 0.0), 15);
            a = new Complex(-8.388608e6, -1.0);
            b = new Complex(8.388608e6, 2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 1.0), 15);
            a = new Complex(8.388608e6, 2.0);
            b = new Complex(8.388608e6, -2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(1.6777216e7, 0.0), 15);
            a = new Complex(8.388608e6, -2.0);
            b = new Complex(-8.388608e6, 2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-8.388608e6, 2.0);
            b = new Complex(-8.388608e6, -2.0);
            TestHelper.TestSignificantDigits(a + b, new Complex(-1.6777216e7, 0.0), 15);
            a = new Complex(-8.388608e6, -2.0);
            b = new Complex(8.388608e6, 8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 8.388606e6), 15);
            a = new Complex(8.388608e6, 8.388608e6);
            b = new Complex(8.388608e6, -8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(1.6777216e7, 0.0), 15);
            a = new Complex(8.388608e6, -8.388608e6);
            b = new Complex(-8.388608e6, 8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(0.0, 0.0), 15);
            a = new Complex(-8.388608e6, 8.388608e6);
            b = new Complex(-8.388608e6, -8.388608e6);
            TestHelper.TestSignificantDigits(a + b, new Complex(-1.6777216e7, 0.0), 15);
            a = new Complex(-8.388608e6, -8.388608e6);
            b = new Complex(0.0, 1.19209289550780998537e-7);
            TestHelper.TestSignificantDigits(a + b, new Complex(-8.388608e6, -8.38860799999988079071e6), 15);
        }
    }
}
